package com.ojoin.trade.common.utils.file;

import java.io.File;

import com.ojoin.trade.common.exception.BusinessException;

public class FileUtilsJoin {
	public static void renameFile(File toBeRenamed, String toFile) {

		File newFile = new File(toFile);

		// 修改文件名
		if (!toBeRenamed.renameTo(newFile)) {
			throw new BusinessException(toBeRenamed + "rename to "+toFile +" error");
		} 
	}
}
